import request from '@/utils/http'
import { BaseResult } from '@/types/axios'

export class FieldService {
  // 获取属性列表
  static getFieldList(params?: object) {
    return request.get<BaseResult>({
      url: '/customer/field/list',
      params
    })
  }
  // 创建属性
  static fieldCreate(params: object) {
    return request.post<BaseResult>({
      url: '/customer/field/create',
      data: params
    })
  }
  // 更新属性
  static fieldUpdate(params: object) {
    return request.post<BaseResult>({
      url: '/customer/field/update',
      data: params
    })
  }
  // 删除属性
  static fieldDelete(params: object) {
    return request.post<BaseResult>({
      url: '/customer/field/delete',
      data: params
    })
  }
}